#ifndef CVERSIONSTORECONFIG_H
#define CVERSIONSTORECONFIG_H
#include <memory>
#include "json/json.h"
#include "ErrorCode.h"

namespace gitstore {

//class CMetaDataOperation;

class CGlobalConfig
{
private:
    CGlobalConfig();

public:
    ~CGlobalConfig();

private:
    static std::shared_ptr<CGlobalConfig> _config;

public:
    static std::shared_ptr<CGlobalConfig> getInstance();

public:
    const Json::Value& getConfigContent() const;

private:
    Json::Value _config_content;

    //private:
    //    class Carbo {
    //    public:
    //        Carbo(){}
    //        ~Carbo() {
    //            if ( CGlobalConfig::m_config ) {
    //                delete CGlobalConfig::m_config;
    //                CGlobalConfig::m_config = nullptr;
    //            }
    //        }
    //    };
    //    static Carbo cb;
};
}
#endif // CVERSIONSTORECONFIG_H
